package GUI.Components;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class NandGate extends BasicGate
{
	private static boolean flag;
	public NandGate() 
	{
		super("Nand Gate");	
		ButtonOk.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent event) 
			{			
				flag=true;
				dispose();				
			}			
		});
	}
	//Why Static??
	public static boolean getFlag()
	{
		return flag;
	}
	public static boolean toggleFlag()
	{
		if(flag==true)
		{
			flag=false;
			return flag;
		}
		else
		{
			flag=true;
			return flag;
		}
	}
}
